package com.beidasoft.web.util;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;

/**
 * Created by LiZhenbin on 2016/5/3.
 */
public class POIExcelUtil {

    /**
     * 创建行
     *
     * @param row       当前行对象
     * @param cellNum   当前列
     * @param cellStyle 列样式
     * @param str       列的值
     * @return
     */
    public static Cell createCell(Row row, int cellNum, CellStyle cellStyle, String str) {
        Cell cell = row.createCell(cellNum);
        cell.setCellStyle(cellStyle);
        cell.setCellValue(str);
        return cell;
    }
}
